$(function(){
    var ajaxFill = new Z.AjaxFill({
        url: Z.url('/entry/records/'+TYPE,true),
        templates: {
            list: '<li>\
                        <a href="${SITE_URL}/index.php/entry/show/${TYPE}/${id}" style="height:190px;">\
                            <img src="${SITE_URL}/assets/uploads/${$item.thumb(file_name)}"/>\
                            <div class="title" style="height:170px;">${title}</div>\
                        </a>\
                    </li>',
            none: '<li></li>',
            loading: '<li style="text-align:center;"><img src="/assets/img/backend/loading.gif"/></li>',
            methods: {
                thumb: function(fileName){
                    return fileName.replace(/\.(jpg|bmp|gif|png|jpeg|gif)$/,'_thumb.$1');
                }
            }
        },
        containers: {
            list: $('.list-container ul'),
            pageLinks: $('.list-container .page-links')
        },
        after: function(){
            Z.alignImage($('.list-container ul.entries li a img'),140,190);
        }
    });
    
    ajaxFill.request(25, 1);
});